<?php
//model模型层做的是业务模型
require '../dao/saiduandao.php';

class saiduanmodel{
	
	
	private $dao;

	
	//用户查询
	public function saiduanquery($saiduanid){
		
		$dao=new saiduandao();
		$rs=$dao->Chaxun($saiduanid);
		if(empty($rs)){
			//没有结果，说明没有该用户
			return 0;
		}
		else{			
			return $rs;
		}	
		
	}

	
	public function saiduantian($saiduan){
	
		$dao=new saiduandao();
		$rs=$dao->Tian($saiduan);
		if(empty($rs)){
			//没有结果，说明没有该用户
			return 0;
		}
		else{
			return $rs;
		}
	
	}
	public function saiduandel($delid){
	
		$dao=new saiduandao();
		$rs=$dao->Del($delid);
		if(empty($rs)){
			//没有结果，说明没有该用户
			return 0;
		}
		else{
			return $rs;
		}
	
	}
	
	
	
}
?>